package org.example.domain;

import org.optaplanner.core.api.domain.lookup.PlanningId;

public class RectangularPiece {
    @PlanningId
    private Long id;
    private int width;
    private int height;
    private boolean isStock; // true表示是板料，false表示是需要切割的零件
    private int demand; // 需求数量(对于零件)

    public RectangularPiece(Long id, int width, int height, boolean isStock, int demand) {
        this.id = id;
        this.width = width;
        this.height = height;
        this.isStock = isStock;
        this.demand = demand;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return height;
    }

    public void setHeight(int height) {
        this.height = height;
    }

    public boolean isStock() {
        return isStock;
    }

    public void setStock(boolean stock) {
        isStock = stock;
    }

    public int getDemand() {
        return demand;
    }

    public void setDemand(int demand) {
        this.demand = demand;
    }
} 